package com.education.wisdom.service.impl;

import com.education.wisdom.mapper.OrderAnswerMapper;
import com.education.wisdom.pojo.OrderAnswer;
import com.education.wisdom.service.OrderAnswerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 答案表 服务层实现
 *
 * @author d
 * @date 2021-03-04 15:45:19
 */
@Service
public class OrderAnswerServiceImpl implements OrderAnswerService {

    @Autowired
    private OrderAnswerMapper orderAnswerMapper;

    //查询答案表信息
    @Override
    public OrderAnswer selectOrderAnswerById(Integer id) {
        return orderAnswerMapper.selectOrderAnswerById(id);
    }

    // 查询答案表列表
    @Override
    public List<OrderAnswer> selectOrderAnswerList(OrderAnswer orderAnswer) {
        return orderAnswerMapper.selectOrderAnswerList(orderAnswer);
    }

    // 新增答案表
    @Override
    public int insertOrderAnswer(OrderAnswer orderAnswer) {
        return orderAnswerMapper.insertOrderAnswer(orderAnswer);
    }

    //修改答案表
    @Override
    public int updateOrderAnswer(OrderAnswer orderAnswer) {
        return orderAnswerMapper.updateOrderAnswer(orderAnswer);
    }

    @Override
    public int updateOrderAnswer1(OrderAnswer orderAnswer) {
        return orderAnswerMapper.updateOrderAnswer1(orderAnswer);
    }

    //删除答案表对象
    @Override
    public int deleteOrderAnswerByIds(String[] ids) {
        return orderAnswerMapper.deleteOrderAnswerByIds(ids);
    }

    @Override
    public int deleteOrderAnswerById(Integer id) {
        return orderAnswerMapper.deleteOrderAnswerById(id);
    }

    @Override
    public int deleteOrderAnswerById1(Integer userId, Integer paperId) {
        return orderAnswerMapper.deleteOrderAnswerById1(userId,paperId);
    }

    @Override
    public int deleteOrderAnswerById3(Integer questionId, Integer paperId) {
        return orderAnswerMapper.deleteOrderAnswerById3(questionId,paperId);
    }

    @Override
    public String[] selectOrderSubmit(Integer paperId) {
        return orderAnswerMapper.selectOrderSubmit(paperId);
    }

    @Override
    public List<OrderAnswer> selectOrderAnswerList1(OrderAnswer orderAnswer) {
        return orderAnswerMapper.selectOrderAnswerList1(orderAnswer);
    }

    @Override
    public List<OrderAnswer> selectOrderAnswerList4(OrderAnswer orderAnswer) {
        return orderAnswerMapper.selectOrderAnswerList4(orderAnswer);
    }

    @Override
    public OrderAnswer selectOrderAnswerList2(Integer paperId, Integer questionId) {
        return orderAnswerMapper.selectOrderAnswerList2(paperId,questionId);
    }

    @Override
    public OrderAnswer selectOrderAnswerList3(Integer paperId,Integer userId,Integer questionId) {
        return orderAnswerMapper.selectOrderAnswerList3(paperId,userId,questionId);
    }
}